.class Lcom/waiqin365/lightapp/dailyreport/view/b;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/widget/AdapterView$OnItemLongClickListener;


# instance fields
.field final synthetic a:Landroid/view/MotionEvent;

.field final synthetic b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;Landroid/view/MotionEvent;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iput-object p2, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemLongClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z
    .locals 9

    const/4 v2, 0x0

    const/4 v3, 0x1

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v0}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v4, v0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v0}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    float-to-int v5, v0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v0, p3}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->a(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iput p3, v0, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->g:I

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v0}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->a(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v0

    if-ge v0, v3, :cond_0

    move v0, v2

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget v1, v1, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->g:I

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-virtual {v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->getFirstVisiblePosition()I

    move-result v6

    sub-int/2addr v1, v6

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    const v1, 0x7f0c05ca

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setSelected(Z)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setEnabled(Z)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-virtual {v0}, Landroid/view/ViewGroup;->getHeight()I

    move-result v6

    invoke-static {v1, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->b(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-virtual {v0}, Landroid/view/ViewGroup;->getWidth()I

    move-result v6

    invoke-static {v1, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->c(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-virtual {v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->getCount()I

    move-result v6

    invoke-static {v1, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->d(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v1}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->b(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v1

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->c(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v6

    div-int/2addr v1, v6

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v7, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v7}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->b(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v7

    iget-object v8, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v8}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->c(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v8

    rem-int/2addr v7, v8

    invoke-static {v6, v7}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->e(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->d(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)I

    move-result v6

    if-eqz v6, :cond_1

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    add-int/lit8 v1, v1, 0x1

    invoke-static {v6, v1}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->f(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    :goto_1
    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget v1, v1, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->g:I

    const/4 v6, -0x1

    if-eq v1, v6, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget v6, v6, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->c:I

    invoke-virtual {v0}, Landroid/view/ViewGroup;->getLeft()I

    move-result v7

    sub-int/2addr v6, v7

    invoke-static {v1, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->g(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget v6, v6, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->d:I

    invoke-virtual {v0}, Landroid/view/ViewGroup;->getTop()I

    move-result v7

    sub-int/2addr v6, v7

    invoke-static {v1, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->h(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v6}, Landroid/view/MotionEvent;->getRawX()F

    move-result v6

    int-to-float v4, v4

    sub-float v4, v6, v4

    float-to-int v4, v4

    iput v4, v1, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->e:I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v4, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v4}, Landroid/view/MotionEvent;->getRawY()F

    move-result v4

    int-to-float v5, v5

    sub-float/2addr v4, v5

    float-to-int v4, v4

    iput v4, v1, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->f:I

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->a(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;Landroid/view/ViewGroup;)Landroid/view/ViewGroup;

    invoke-virtual {v0}, Landroid/view/ViewGroup;->destroyDrawingCache()V

    invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->setDrawingCacheEnabled(Z)V

    invoke-virtual {v0}, Landroid/view/ViewGroup;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-static {v1}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object v1

    iget-object v4, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v4}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->e(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)Landroid/os/Vibrator;

    move-result-object v4

    const-wide/16 v6, 0x32

    invoke-virtual {v4, v6, v7}, Landroid/os/Vibrator;->vibrate(J)V

    iget-object v4, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    iget-object v5, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v5}, Landroid/view/MotionEvent;->getRawX()F

    move-result v5

    float-to-int v5, v5

    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->a:Landroid/view/MotionEvent;

    invoke-virtual {v6}, Landroid/view/MotionEvent;->getRawY()F

    move-result v6

    float-to-int v6, v6

    invoke-virtual {v4, v1, v5, v6}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->a(Landroid/graphics/Bitmap;II)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v1}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->f(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;)V

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v0, v2}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->a(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;Z)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-virtual {v0, v3}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->requestDisallowInterceptTouchEvent(Z)V

    move v0, v3

    goto/16 :goto_0

    :cond_1
    iget-object v6, p0, Lcom/waiqin365/lightapp/dailyreport/view/b;->b:Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;

    invoke-static {v6, v1}, Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;->f(Lcom/waiqin365/lightapp/dailyreport/view/ChanelGridView;I)I

    goto/16 :goto_1

    :cond_2
    move v0, v2

    goto/16 :goto_0
.end method
